/*
 * RentalBO.java
 *
 * Stores information about a rental.  This object contains the relevant
 * revenue source ID, the amount or percentage of the coupon, the start and
 * expiration dates, and a description of the coupon.
 */

package edu.byu.isys413.group1E.data;

import java.util.Calendar;
import java.util.Date;

/** Contains the information regarding the rental of equipment
 *
 * @author Jon Tehero
 */
public class RentalBO extends RevenueSourceBO{
    
    private ProductBO product;
    private String dateOut;
    private String dateIn = null;
    private String dateDue;
    private double pricePerDay;
    
    /** Creates a new instance of RentalBO */
    RentalBO() {
        this.setType("rental");
    }
    
    /**
     * Creates a new instance of TransactionBO with an ID
     * @param revSrcID contains the revSrcID
     */
    RentalBO(String revSrcID) {
        this.setType("rental");
        setRevSrcID(revSrcID);
        setIsDirty(true);
    }
    
    /** Returns the product
     *@return product
     */
    public String getDateOut() {
        return dateOut;
    }
    
    /**
     * Sets the dateOut
     * @param dateOut contains DateOut
     */
    public void setDateOut(String dateOut) {
        this.dateOut = dateOut;
        setIsDirty(true);
    }
    
    /**
     * Gets the DateIn
     * @return dateIn
     */
    public String getDateIn() {
        return dateIn;
    }
    
    /**
     * Sets DateIn
     * @param dateIn contains dateIn
     */
    public void setDateIn(String dateIn) {
        this.dateIn = dateIn;
    }
    
    /**
     * Gets DateDue
     * @return dateDue
     */
    public String getDateDue() {
        return dateDue;
    }
    
    /**
     * Sets dateDue
     * @param dateDue dateDue
     */
    public void setDateDue(String dateDue) {
        this.dateDue = dateDue;
        setIsDirty(true);
    }

    /**
     * gets the price per day
     * @return price per day
     */
    public double getPricePerDay() {
        return pricePerDay;
    }

    /**
     * sets the price per day
     * @param pricePerDay contains price per day
     */
    public void setPricePerDay(double pricePerDay) {
        this.pricePerDay = pricePerDay;
    }

    /**
     * gets the product object
     * @return  product as an object
     */
    public ProductBO getProduct() {
        return product;
    }

    /**
     * sets the product
     * @param product contains the productBO
     */
    public void setProduct(ProductBO product) {
        this.product = product;
        setIsDirty(true);
    }
}
